<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Ogre_glTF: C:/YbalridSoftware/AnnwvynSDK64/Ogre_glTF/src/private_headers/Ogre_glTF_skeletonImporter.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Ogre_glTF
   </div>
   <div id="projectbrief">glTF import library for Ogre</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_ogre__gl_t_f__skeleton_importer_8hpp_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Ogre_glTF_skeletonImporter.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;tiny_gltf.h&gt;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;OgrePrerequisites.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;OgreOldBone.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_ogre__gl_t_f.html">Ogre_glTF</a></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;{</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_ogre__gl_t_f_1_1skeleton_importer.html">   10</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_ogre__gl_t_f_1_1skeleton_importer.html">skeletonImporter</a></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    {</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;        tinygltf::Model&amp; model;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        <span class="keyword">using</span> tinygltfJointNodeIndex = int;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">int</span> skeletonID;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;        Ogre::v1::SkeletonPtr skeleton;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;        <span class="keywordtype">void</span> addChidren(<span class="keyword">const</span> std::string&amp; skinName, <span class="keyword">const</span> std::vector&lt;int&gt;&amp; childs, Ogre::v1::OldBone* parent, <span class="keyword">const</span> std::vector&lt;int&gt;&amp; joints);</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;        <span class="keywordtype">void</span> loadBoneHierarchy(<span class="keyword">const</span> tinygltf::Skin&amp; skin, Ogre::v1::OldBone* rootBone, <span class="keyword">const</span> std::string&amp; name);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        <span class="keyword">struct </span>keyFrame</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        {</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;            <span class="keywordtype">float</span> timePoint{ -1 };</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;            <span class="keywordtype">float</span> weights{};</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;            Ogre::Quaternion rotation{};</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;            Ogre::Vector3 position, scale{};</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        };</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        <span class="keyword">using</span> keyFrameList = std::vector&lt;keyFrame&gt;;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        <span class="keyword">using</span> channelList = std::vector&lt;std::reference_wrapper&lt;tinygltf::AnimationChannel&gt;&gt;;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        <span class="keyword">using</span> nodeIndexConversionMap = std::unordered_map&lt;tinygltfJointNodeIndex, tinygltfJointNodeIndex&gt;;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        nodeIndexConversionMap nodeToJointMap;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        std::vector&lt;Ogre::Matrix4&gt; bindMatrices;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordtype">void</span> loadTimepointFromSamplerToKeyFrame(<span class="keywordtype">int</span> bone, <span class="keywordtype">int</span> frameID, <span class="keywordtype">int</span>&amp; count, keyFrame&amp; animationFrame, tinygltf::AnimationSampler&amp; sampler);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordtype">void</span> loadVector3FromSampler(<span class="keywordtype">int</span> frameID, <span class="keywordtype">int</span>&amp; count, tinygltf::AnimationSampler&amp; sampler, Ogre::Vector3&amp; vector);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <span class="keywordtype">void</span> loadQuatFromSampler(<span class="keywordtype">int</span> frameID, <span class="keywordtype">int</span>&amp; count, tinygltf::AnimationSampler&amp; sampler, Ogre::Quaternion&amp; quat) <span class="keyword">const</span>;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">void</span> detectAnimationChannel(<span class="keyword">const</span> channelList&amp; channels, tinygltf::AnimationChannel*&amp; translation, tinygltf::AnimationChannel*&amp; rotation, tinygltf::AnimationChannel*&amp; scale, tinygltf::AnimationChannel*&amp; weights) <span class="keyword">const</span>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordtype">void</span> loadKeyFrameDataFromSampler(<span class="keyword">const</span> tinygltf::Animation&amp; animation, <span class="keywordtype">int</span> bone, tinygltf::AnimationChannel* translation, tinygltf::AnimationChannel* rotation, tinygltf::AnimationChannel* scale, tinygltf::AnimationChannel* weights, <span class="keywordtype">int</span> frameID, <span class="keywordtype">int</span>&amp; count, keyFrame&amp; animationFrame);</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordtype">void</span> loadKeyFrames(<span class="keyword">const</span> tinygltf::Animation&amp; animation, <span class="keywordtype">int</span> bone, keyFrameList&amp; keyFrames, tinygltf::AnimationChannel* translation, tinygltf::AnimationChannel* rotation, tinygltf::AnimationChannel* scale, tinygltf::AnimationChannel* weights);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordtype">void</span> loadSkeletonAnimations(tinygltf::Skin skin, <span class="keyword">const</span> std::string&amp; skeletonName);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="class_ogre__gl_t_f_1_1skeleton_importer.html#a11798c5b89ddfa0878c1a852946c5957">skeletonImporter</a>(tinygltf::Model&amp; input);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        Ogre::v1::SkeletonPtr <a class="code" href="class_ogre__gl_t_f_1_1skeleton_importer.html#af910753676d8c5bf1baea2bd3a596bbb">getSkeleton</a>(<span class="keyword">const</span> std::string&amp; adapterName);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    };</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;}</div><div class="ttc" id="class_ogre__gl_t_f_1_1skeleton_importer_html"><div class="ttname"><a href="class_ogre__gl_t_f_1_1skeleton_importer.html">Ogre_glTF::skeletonImporter</a></div><div class="ttdef"><b>Definition:</b> <a href="_ogre__gl_t_f__skeleton_importer_8hpp_source.html#l00010">Ogre_glTF_skeletonImporter.hpp:10</a></div></div>
<div class="ttc" id="class_ogre__gl_t_f_1_1skeleton_importer_html_a11798c5b89ddfa0878c1a852946c5957"><div class="ttname"><a href="class_ogre__gl_t_f_1_1skeleton_importer.html#a11798c5b89ddfa0878c1a852946c5957">Ogre_glTF::skeletonImporter::skeletonImporter</a></div><div class="ttdeci">skeletonImporter(tinygltf::Model &amp;input)</div><div class="ttdef"><b>Definition:</b> <a href="_ogre__gl_t_f__skeleton_importer_8cpp_source.html#l00070">Ogre_glTF_skeletonImporter.cpp:70</a></div></div>
<div class="ttc" id="class_ogre__gl_t_f_1_1skeleton_importer_html_af910753676d8c5bf1baea2bd3a596bbb"><div class="ttname"><a href="class_ogre__gl_t_f_1_1skeleton_importer.html#af910753676d8c5bf1baea2bd3a596bbb">Ogre_glTF::skeletonImporter::getSkeleton</a></div><div class="ttdeci">Ogre::v1::SkeletonPtr getSkeleton(const std::string &amp;adapterName)</div><div class="ttdoc">Return the constructed skeleton pointer. </div><div class="ttdef"><b>Definition:</b> <a href="_ogre__gl_t_f__skeleton_importer_8cpp_source.html#l00347">Ogre_glTF_skeletonImporter.cpp:347</a></div></div>
<div class="ttc" id="namespace_ogre__gl_t_f_html"><div class="ttname"><a href="namespace_ogre__gl_t_f.html">Ogre_glTF</a></div><div class="ttdef"><b>Definition:</b> <a href="_ogre__gl_t_f__internal__utils_8hpp_source.html#l00005">Ogre_glTF_internal_utils.hpp:5</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_a91c8a98b5018f6a00270b1d102aba85.html">private_headers</a></li><li class="navelem"><b>Ogre_glTF_skeletonImporter.hpp</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
  </ul>
</div>
</body>
</html>
